//
//  DetailV.m
//  FKGW
//
//  Created by song ce on 2017/2/21.
//  Copyright © 2017年 song ce. All rights reserved.
//

#import "DetailV.h"
#import "BaseViewController.h"


@implementation DetailV

- (void)awakeFromNib {
    [super awakeFromNib];
    self.width = Main_Screen_Width;
    self.height = 84;
}
- (IBAction)lookHistoryVedio:(UIButton *)sender {
    [MBProgressHUD showTipMessageInWindow:@"该功能正在开发\r\n敬请期待..."];

}

-(void)setModel:(GoodsDetailModel *)model{
    _model = model;
    self.currentPriceLabel.text = [NSString stringWithFormat:@"￥%@",_model.pnowprice];

    NSString *market = [NSString stringWithFormat:@"%@元",_model.poriginalprice];
    NSMutableAttributedString *attributeMarket = [[NSMutableAttributedString alloc] initWithString:market];
    [attributeMarket setAttributes:@{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle], NSBaselineOffsetAttributeName : @(NSUnderlineStyleSingle)} range:NSMakeRange(0,market.length)];
    self.oldParice.attributedText = attributeMarket;
   
    // 赋值
    self.saleCountLabel.text = [NSString stringWithFormat:@"%@人已买",_model.alreadybuy];
    self.goodsNameLabel.text = _model.pname;
}

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if(self){
            }
    return self;
}

@end
